home *** CD-ROM | disk | FTP | other *** search
- IBM PrtSc Protector
- (COMPUTE! Magazine February 1986 by Marc Sugiyama)
-
- One major complaint with the IBM PC keyboard is the position of
- the PrtSc key. If your finger goes astray and accidentally hits both
- Shift and PrtSc, the PC dumps the screen to the printer. Its annoying
- particularly when you're printing a long document of when you don't
- have a printer attached. If there's no printer, the PC locks up until
- it figures out that there's nothing to print to.
-
- Nevertheless, it's nice to have the screen dump capability handy
- when you need it. You wouldn't want to complete disable the function,
- but it would be nice if it were harder to call by accident.
-
- "PrtSc Protector" offers a good compromise. It's a short machine
- language program that patches into the PrtSc function and distinguishes
- between the two Shift keys. If you press the right Shift key with
- PrtSc, nothing happens. If you press the left Shift key with PrtSc,
- you get the screen dump you really wanted.
-
- NOPRTSC.BAS creates the machine language file NOPRTSC.COM. You
- activate NOPRTSC.COM simply by typing NOPRTSC at the DOS prompt. The
- resident portion of NOPRTSC.COM takes 280 bytes of memory.
-
- If you want to dump graphics screen to the printer, install
- NOPRTSC.COM after installing GRAPHICS.COM. Don't try to install
- GRAPHICS.COM more than once, or the computer will crash. Likewise,
- don't try to install NOPRTSC.COM more than once. When NOPRTSC.COM is
- installed successfully, it returns a zero in the ERRORLEVEL variable;
- otherwise, it returns a one.
-
- 10 'NOPRTSC.BAS
- 100 CLS:LOCATE 10,10:PRINT"Writing file ..."
- 110 OPEN "NOPRTSC.COM" FOR OUTPUT AS #1
- 120 FOR I=1 TO 279:READ BYTE:CKSUM=CKSUM+BYTE
- 130 PRINT #1,CHR$(BYTE);
- 140 NEXT I:CLOSE 1
- 150 IF CKSUM<>25301 THEN PRINT"Error in data statements.":END
- 160 PRINT:PRINT"NOPRTSC.COM created.":END
- 200 DATA 233,171,0,80,97,117,108,80,83,81,82,86
- 210 DATA 87,85,180,2,205,22,168,2,116,6,156,154
- 220 DATA 0,0,0,0,93,95,94,90,89,91,88,207
- 230 DATA 80,114,111,116,101,99,116,101,100,32,80,114
- 240 DATA 116,83,99,32,105,110,115,116,97,108,108,101
- 250 DATA 100,46,32,32,83,104,105,102,116,45,80,114
- 260 DATA 116,83,99,32,117,115,105,110,103,32,114,105
- 270 DATA 103,104,116,45,115,104,105,102,116,32,100,105
- 280 DATA 115,97,98,108,101,100,46,13,10,36,80,114
- 290 DATA 111,116,101,99,116,101,100,32,80,114,116,83
- 300 DATA 99,32,97,108,114,101,97,100,121,32,105,110
- 310 DATA 115,116,97,108,108,101,100,46,13,10,36,82
- 320 DATA 101,113,117,105,114,101,115,32,68,79,83,32
- 330 DATA 50,46,48,32,111,114,32,97,98,111,118,101
- 340 DATA 46,13,10,36,0,0,180,48,205,33,60,0
- 350 DATA 117,9,186,143,1,180,9,205,33,205,32,187
- 360 DATA 36,1,177,4,211,235,67,137,30,172,1,184
- 370 DATA 5,53,205,33,137,30,24,1,140,6,26,1
- 380 DATA 190,3,1,141,127,252,185,4,0,252,243,166
- 390 DATA 131,249,0,116,33,180,9,186,36,1,205,33
- 400 DATA 184,5,37,186,7,1,205,33,161,44,0,142
- 410 DATA 192,180,73,205,33,184,0,49,139,22,172,1
- 420 DATA 205,33,186,106,1,180,9,205,33,184,1,76
- 430 DATA 205,33,0
-
-